#!
# test the subs in stemming.pl
use stemming;
use File::Basename;
if(@ARGV != 2)
{
    print "Usage:\n\t",basename($0)," input output";
    exit;
}

initialise();
open OUTPUT,">$ARGV[1]" or die "can not open $ARGV[1], $!\n";

my %tf = stem_file($ARGV[0]);

foreach( sort {$tf{$b} <=> $tf{$a} } keys %tf )
{
    print OUTPUT $_,"  ",$tf{$_},"\n";
}

close OUTPUT;
print "successed!";

